﻿using System;
using System.Windows.Forms;

namespace ConfigurationManagement.Administration
{
    static class Program
    {
        /// <summary>
        /// The main entry point for the application.
        /// </summary>
        [STAThread]
        static void Main()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            Application.SetUnhandledExceptionMode(UnhandledExceptionMode.CatchException);
            Application.ThreadException += ErroHandler;            
            Application.Run(new Host());
        }

        private static void ErroHandler(object sender, System.Threading.ThreadExceptionEventArgs args)
        {
            if (args.Exception != null)
                MessageBox.Show(args.Exception.Message, @"Error");
        }
    }
}
